<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:83:"/www/wwwroot/crm.liunuo.net/public/../application/user/view/index/info_mobile.phtml";i:1552999927;s:67:"/www/wwwroot/crm.liunuo.net/application/user/view/base_mobile.phtml";i:1552999924;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title><?php echo config('website.site_name')?></title>
<link rel="stylesheet" type="text/css" href="/static/hui/css/hui.css" />
<style>.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}</style>

</head>
<body>

<header class="hui-header">
    <div id="hui-back"></div>
    <h1>编辑资料</h1>
    <div id="hui-header-menu" onclick="hui.showSlideMenu();"></div>
</header>
<div class="hui-wrap">
    <form action="<?php echo request()->url(); ?>" class="hui-form" method="post">
        <div class="hui-form-items">
            <div class="hui-form-items-title">用户名</div>
            <input type="text" value="<?php echo (isset($data['username']) && ($data['username'] !== '')?$data['username']:''); ?>" autocomplete="off" class="hui-input hui-input-clear" disabled>
        </div>
        <div class="hui-form-items">
            <div class="hui-form-items-title">用户昵称</div>
            <input type="text" name="realname" value="<?php echo (isset($data['realname']) && ($data['realname'] !== '')?$data['realname']:''); ?>" autocomplete="off" lay-verify="required" class="hui-input">
        </div>
        <div class="hui-form-items">
            <div class="hui-form-items-title">手机号码</div>
            <input type="text" name="mobile" value="<?php echo (isset($data['mobile']) && ($data['mobile'] !== '')?$data['mobile']:''); ?>" autocomplete="off" lay-verify="phone|number" class="hui-input">
        </div>
        <div class="hui-form-items">
            <div class="hui-form-items-title">E-mail</div>
            <input type="text" name="email" value="<?php echo (isset($data['email']) && ($data['email'] !== '')?$data['email']:''); ?>" autocomplete="off" lay-verify="phone|number" class="hui-input">
        </div>
        <div class="hui-form-items">
            <div class="hui-form-items-title">微信绑定</div>
            <?php if($data['openid']==''): ?>
            <a href="javascript:hui.open('<?php echo url('user/weixin/login', ['type' => 'bangding']); ?>');" class="hui-button hui-button-small hui-danger hui-fl" style="margin:0px 10px;">立即绑定</a>
            <?php else: $wxuser = model('weixinUser')->where(['openid'=>$data['openid']])->find(); ?>
            <a href="javascript:hui.open('<?php echo url('user/weixin/login', ['type' => 'bangding']); ?>');" class="hui-button hui-button-small hui-danger hui-fl" style="margin:0px 10px;"><?php echo $wxuser['nickname']; ?></a>
            <?php endif; ?>
        </div>
        <div style="padding:15px 8px;">
            <button class="hui-button hui-button-large hui-primary" lay-filter="*" lay-submit="">保存</button>
        </div>
    </form>
</div>
<script src="/static/libs/layui/layui.all.js"></script>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/layui.base.js"></script>
<script type="text/javascript">
        var phoneReg = /(^1[3|4|5|7|8]\d{9}$)|(^09\d{8}$)/;//手机号正则 
        var count = 60; //间隔函数，1秒执行
        var InterValObj1; //timer变量，控制时间
        var curCount1;//当前剩余秒数
        /*第一*/
        function sendMessage1() {
                curCount1 = count;		 		 
                var phone = $.trim($('#mobile').val());
                if (!phoneReg.test(phone)) {
                        alert(" 请输入有效的手机号码"); 
                        return false;
                }
                $.ajax({
                    type: "POST",      //data 传送数据类型。post 传递
                    dataType: 'json',  // 返回数据的数据类型json
                    url: "/user/index/captcha_sms",  // yii 控制器/方法
                    cache: false,      
                    data: {mobile: phone},  //传送的数据
                    error:function(){
                       alert("数据传输错误");
                    },success: function (data) {
                        if(window.console){
                            console.log(data);
                        }else{
                            console.log(data);
                        }
                    }
                });      

                //设置button效果，开始计时
                $("#btnSendCode1").attr("disabled", "true");
                $("#btnSendCode1").val( + curCount1 + "秒再获取");
                InterValObj1 = window.setInterval(SetRemainTime1, 1000); //启动计时器，1秒执行一次
                //向后台发送处理数据

        }
        function SetRemainTime1() {
                if (curCount1 == 0) {                
                        window.clearInterval(InterValObj1);//停止计时器
                        $("#btnSendCode1").removeAttr("disabled");//启用按钮
                        $("#btnSendCode1").val("重新发送");
                }
                else {
                        curCount1--;
                        $("#btnSendCode1").val( + curCount1 + "秒再获取");
                }
        } 

        /*提交*/
        function binding(){
                alert(1)
        }
</script>

<div class="hui-slide-menu">
    <ul>
        <?php if(is_array($navbar) || $navbar instanceof \think\Collection || $navbar instanceof \think\Paginator): if( count($navbar)==0 ) : echo "" ;else: foreach($navbar as $key=>$v): if($v['id']=='1'): if(is_array($v['children']) || $v['children'] instanceof \think\Collection || $v['children'] instanceof \think\Paginator): if( count($v['children'])==0 ) : echo "" ;else: foreach($v['children'] as $key=>$n1): ?>
                    <li><a href="javascript:hui.open('<?php echo \think\Request::instance()->root(true); ?>/<?php echo $n1['url']; ?>');"><?php echo $n1['name']; ?></a></li>
                <?php endforeach; endif; else: echo "" ;endif; endif; endforeach; endif; else: echo "" ;endif; ?>
        <li><a href="javascript:hui.open('<?php echo url('user/index/logout'); ?>');">退出账户</a></li>
        <li style="padding-top:30px;">
            <button type="button" class="hui-button hui-button-large" onclick="hui.closeSlideMenu();">关闭菜单</button>
        </li>
    </ul>
</div>
<div id="hui-footer">
    <a href="javascript:hui.open('/user/');" id="nav-home">
        <div class="hui-footer-icons hui-icons-home"></div>
        <div class="hui-footer-text">首页</div>
    </a>
    <a href="javascript:hui.open('/user/customer/track');" id="nav-news">
        <div class="hui-footer-icons hui-icons-news"></div>
        <div class="hui-footer-text">跟踪</div>
    </a>
    <div style="width:20%; text-align:center;" class="hui-fl">
        <img src="/static/hui/img/logo_footer.png" height="44" onclick="hui.open('/user/customer/');" />
    </div>
    <a href="javascript:hui.open('/user/customer/remind');" id="nav-forum">
        <div class="hui-footer-icons hui-icons-forum"></div>
        <div class="hui-footer-text">提醒</div>
    </a>
    <a href="javascript:hui.showSlideMenu();" id="nav-my" id="hui-header-menu" onclick="hui.showSlideMenu();">
        <div class="hui-footer-icons hui-icons-my"></div>
        <div class="hui-footer-text">我的</div>
    </a>
</div>
<script src="/static/hui/js/hui.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
hui.slideMenu();
//hui('#nav-my').pointMsg();
//hui('#nav-news').pointMsg('hot', null, null, null, '1px');
<?php $remind_sum= today_remind_sum();?>
hui('#nav-forum').pointMsg(<?php echo $remind_sum['count']; ?>);
</script>
<script src="/static/libs/layui/layui.all.js"></script>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/layui.base_mobile.js"></script>

</body>
</html>